/* DatetimePickerWidget.js
 *
 * Copyright 2006, Tim Dwelle.
 *
 * Licensed under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in
 * compliance with the License.  You may obtain a copy of
 * the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in
 * writing, software distributed under the License is
 * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied.  See
 * the License for the specific language governing
 * permissions and limitations under the License.
 *
 */

$package("dowry.widget");

/**
 * DatetimePickerWidget is just like DatePicker, except the
 * popup calendar includes a picker for time as well.
 *
 * <p>
 * This class uses
 * <a href="http://www.dynarch.com/projects/calendar">
 * JSCalendar</a> to provide the popup calendar
 * functionality.  Since this code is not bundled with
 * Dowry, please be sure to include the associated
 * scripts, stylesheets, etc. for this external library.
 * </p>
 *
 */
$class("DatetimePickerWidget").$extends("DatePickerWidget").$as(
{
    /**
     * Extends the default <code>getJsCalendarParams()
     * </code> to include the <code>showsTime</code>
     * property with a 12-hour <code>timeFormat</code>.
     *
     * @return  an object containing the JSCalendar
     *          parameters
     *
     */
    getJsCalendarParams : function()
    {
        var params = this.$super(arguments);
        params.showsTime = true;
        params.timeFormat = 12;
        return params;
    }
});